<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * Copyright (C) 2007  Robert Moss
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

require_once "$mosConfig_absolute_path/components/com_joomleague/joomleague.js.php";?>

<a name="jl_top" id="jl_top"></a>
<!-- Header with Project Name-->
<?php if ($table_config['show_project_heading'] == "1" OR $overall_config['show_project_heading'] == "1") { ?>
<div class="componentheading"<?php if ($table_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") echo ' style="float:left;"';?>><?php echo HTML_joomleague::showTitle($project, $overall_config['project_heading_type']); ?></div>
<!-- Druckfunktion -->
<?php if ($table_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") {
HTML_joomleague::PrintIcon( $row, $params, false, '' );
};?>
<!-- Druckfunktion Ende -->
<?php } ?>
<!-- Header END -->


<!-- section header e.g. ranking, results etc. -->
<table class="contentpaneopen" width="100%">
 	<tr>
   <td class="contentheading">
       <?php if ($table_config['show_section_heading']==1)	HTML_joomleague::show_ranking_title($table_config);?>
   </td>
 </tr>
 <tr>
   <td align="left">
      <?php if ($table_config['show_ranking_dropdown']==1) { echo HTML_joomleague::rankingnav($table_config);}?>
   </td>
  </tr>
</table>
<!-- section header e.g. ranking, results etc. END -->

<br />

<!-- content -->
<?php

foreach ( $current_ranking as $key=>$cu_rk ) {
  $thisawayrank = (isset($awayRank[$key])) ? $awayRank[$key] : NULL;
  $thishomerank = (isset($homeRank[$key])) ? $homeRank[$key] : NULL;
  if ($key) {
    echo '<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0"><tr><td class="contentheading">';
      HTML_joomleague::show_ranking_division_title($key);
    echo '</td></tr></table>';
  }
  ?>
  <table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  <?php
  HTML_joomleague::show_ranking_heading($table_config);
  HTML_joomleague::show_ranking_entries($cu_rk, $previous_ranking[$key], $thishomerank, $thisawayrank, $table_config);
  ?>
  </table><br/>
  <?php
}
?>

<!-- ranking END -->
<!-- colors legend START -->
<?php if ($table_config['show_colors_legend']==1){;?>
<br />
<table width="96%" align="center" cellpadding="3" cellspacing="0">
  <tr>
      <?php
       HTML_joomleague::show_colors_legend();
      ?>
  </tr>
</table>
<?php };?>
<!-- colors legend END -->
<!-- if available points manipulations with explanations START -->
<?php
HTML_joomleague::show_manipulations($result);
 ?>
<!-- if available points manipulations with explanations END -->
<!-- matchdays pageNav -->
<?php
if (isset($pageNav)&&$table_config['show_matchday_pagenav']==1) { ?>
<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  <tr>
   <td align="center">
   <br />
   <?=$pageNav ?>
<br /></td>
  </tr>
</table>
<?php
} ?>
<!-- matchdays pageNav END -->

<!-- Print Button START -->
<?php if ($table_config['show_back_button'] > 0 OR $overall_config['show_back_button'] > 0) {;?>
<?php if ($table_config['show_back_button'] == "1" OR $overall_config['show_back_button'] == "1") echo '<div align="left">'; else echo '<div align="right">';?>
<?php
$params = new mosParameters( '' );
$params->def( 'back_button', true );
$params->def( 'popup', false );
mosHTML::BackButton( $params );
?></div> 
<?php };?>
<!-- Print Button END -->
